package com.htc.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.htc.model.Banner;

public interface BannerMapper {
    
	@Select("SELECT * from banner ${where} order by sort asc")
    List<Banner> queryList(@Param("where")String where);
    
	@Delete("delete from banner where id=#{id}")
    void del(int id);

	@Update("update banner set title=#{title},imgUrl=#{imgUrl},sort=#{sort},link=#{link} where id=#{id} ")
    void update(Banner classes);
    
	@Insert("insert into banner (title,imgUrl,sort,link) values(#{title},#{imgUrl},#{sort},#{link})")
    void insert(Banner banner);
    
}